package com.dferreira.languagesteach.fragments;

import com.dferreira.languagesteach.data_adapters.SubjectsAdapter;
import com.dferreira.languagesteach.fragments.generic.NavigationListFragment;

/**
 * Created by dferreira on 5/29/14.
 * for LanguagesTeach
 */
public class SubjectsFragment extends NavigationListFragment {
    private SubjectsAdapter subjectsAdapter;

    /**
     *
     */
    @Override
    public void onStart() {
        Boolean buildResult;
        super.onStart();

        subjectsAdapter = new SubjectsAdapter(getActivity(), getFragmentStack(), getPackageFolder());
        buildResult = subjectsAdapter.buildDataSet();
        if (buildResult) {
            setListAdapter(subjectsAdapter);
        } else {
            getActivity().onBackPressed();
        }
    }
}
